package smartlifev30.com.sdk.api.gateway_app;

import android.support.annotation.NonNull;

import smartlifev30.com.sdk.util.JsonUtil;
import smartlifev30.com.sdk.api.CallBack;
import smartlifev30.com.sdk.api.ConstantGateway;
import smartlifev30.com.sdk.bean.request.GetWifiStateRequest;
import smartlifev30.com.sdk.net.baiwei.NetManager;

/**
 * Created by tys on 2018/8/15.
 */

public class WifiMgmtGatewayImpl implements IWifiGatewayMgmt {


    @Override
    public void getWifiState(@NonNull String userName, @NonNull String token, @NonNull String sn,
                             @NonNull CallBack<String> callBack) {
        GetWifiStateRequest getWifiStateRequest = new GetWifiStateRequest();
        getWifiStateRequest.setFrom(userName);
        getWifiStateRequest.setTo(sn);
        getWifiStateRequest.setMsg_id(callBack.getMsgId());
        getWifiStateRequest.setMsg_class(ConstantGateway.MSG_CLASS_WIFI);
        getWifiStateRequest.setMsg_name("wifi_query");
        getWifiStateRequest.setMsg_type(ConstantGateway.MSG_TYPE_GET);
        getWifiStateRequest.setToken(token);
        NetManager.getInstance().sendMessage(JsonUtil.toString(getWifiStateRequest));
    }




}
